from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.script import Manager
from info import create_app,db,models


# 通过指定的配置创建出对应配置的app
app = create_app("development")

# 创建中间管理者manage.py:8
manager = Manager(app)
# 将app与db关联
Migrate(app,db)
# 将迁移命令添加到manager中
manager.add_command("db",MigrateCommand)





if __name__ == '__main__':
    # app.run()
    manager.run()